import java.util.Map;
import java.util.HashMap;

public class ScoreRecorder {
    private Map<String, Integer> studentScores = new HashMap<>();
    private Map<String, Integer> groupScores = new HashMap<>();
    private Map<String, Boolean> studentAttendance = new HashMap<>();

    // 添加学生的分数
    public void addStudentScore(String studentName, int score) {
        studentScores.merge(studentName, score, Integer::sum);
    }

    // 添加小组的分数
    public void addGroupScore(String groupName, int score) {
        groupScores.merge(groupName, score, Integer::sum);
    }

    // 记录学生的考勤
    public void recordStudentAttendance(String studentName, boolean present) {
        studentAttendance.put(studentName, present);
    }

    // 获取学生的分数列表
    public Map<String, Integer> getStudentScores() {
        return studentScores;
    }

    // 获取小组的分数列表
    public Map<String, Integer> getGroupScores() {
        return groupScores;
    }

    // 获取学生的考勤记录列表
    public Map<String, Boolean> getStudentAttendance() {
        return studentAttendance;
    }
}
